#include "widget.h"
#include "ui_widget.h"

Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);
}

Widget::~Widget()
{
    delete ui;
}


void Widget::on_pushButton_clicked()
{
    QString result="我今天准备去:";

    if(ui->checkBox_study->isChecked())//判断是否有勾选
    {
        result+=ui->checkBox_study->text()+" ";
    }

    if(ui->checkBox_game->isChecked())
    {
        result+=ui->checkBox_game->text()+" ";
    }

    if(ui->checkBox_travel->isChecked())
    {
        result+=ui->checkBox_travel->text()+" ";
    }

    ui->label->setText(result);//设置进标签中
}
